<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>内置指令</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>
<body>
<div id="app">
    <p ref="content">TTTTTTT</p>
    <button @click="hint">click</button>
    <!-- 防止闪屏 -->
    <p v-cloak>{{msg}}</p>
</div>
<script src="../vue.min-2.6.10.js"></script>
<script>
    new Vue({
        el: '#app',
        data:{

        },
        methods: {
            hint() {
                console.log(this.$refs.content.textContent);
            }
        }
    })
</script>
</body>
</html>